#include "Item.h"
#include <stdio.h>

ItemData misc[] = {
	{"Leather Bag", 	40},
	{"Jewelry Sack", 	31},
	{"Sentinel's Glyph", 	90},
	{"Violet Bouquet", 	12},
	{"Rock", 	1},
	{"Wooden Ladle", 	20},
	{"Blacksmith Tongs", 	50},
	{"Flint", 	10},
	{"Jewelry Box", 	15},
	{"Coffer", 	57},
	{"Garland", 	80},
	{"Clay Cup", 	1},
	{"Metal Jug", 	10},
	{"Pot", 	20},
	{"Mug", 	25},
	{"Spoon", 	16},
	{"Teaspoon", 	2},
	{"Tablecloth", 	5},
	{"Quilt", 	19},
	{"Pillow", 	40},
	{"Plate", 	15},
	{"Paper", 	10},
	{"Scissors", 	7},
	{"Lizard", 	7},
	{"Spock", 	7},
	{"Candle", 	7},
	{"Sleeping Bag", 	7},
	{"Short Rope", 	13},
	{"Long Rope", 	50},
	{"Olive", 	31},
	{"Stick", 	41},
	{"Bandage", 	20},
	{"Portable Tent", 	1},
	{"CPR Scroll", 	5},
	{"Prayer Book", 	100},
	{"Prayer Scarf", 	12},
	{"Symbol Of The Gods", 	66},
	{"Meditation Blanket", 	59},
	{"Wax", 	24},
	{"Sage", 	12},
	{"Mint", 	44},
	{"St. John's Wort", 	10},
	{"Toad Eyes", 	12},
	{"Little Empty Flask", 	15}
};

ItemData clothes[] = {
	{"Shirt", 	30},
	{"Vest", 	20},
	{"Smith's Apron", 	60},
	{"Dress", 	40},
	{"Cassock", 	50},
	{"Apron", 	80},
	{"Chemise", 	35},
	{"Trousers", 	35},
	{"Pants", 	30},
	{"Skirt", 	20},
	{"Petticoat", 	25},
	{"King's Coat", 	300},
	{"Armor", 	250},
	{"Small Belt", 	10},
	{"Belt", 	10},
	{"Hat", 	5}
};

ItemData armor[] = {
	{"Steel Boots", 	88},
	{"Decorated Breastplate", 	90},
	{"Leather Armor", 	40},
	{"Studded Armor", 	56},
	{"Shadow Armor", 	110},
	{"Chainmail", 	65},
	{"Girdle", 	34},
	{"Full Plate Armor", 	150},
	{"Helmet", 	20}
};

ItemData quest[] = {
	{"Fox Body", 	1},
	{"Lucky Rabbit's Foot", 	36},
	{"Four Leaf Clover", 	77},
	{"The Przedmiot", 	73},
	{"Blacksmithing Hammer", 	50},
	{"Bunch Of Herbs", 	11},
	{"Horse Collar", 	32},
	{"Uncle Tom's Pipe", 	15},
	{"Old Ruined Grimoire", 	99},
	{"Recipes", 	30},
	{"Spare Wheel", 	47},
	{"Silver Kettle", 	21},
	{"Bridle", 	50},
	{"Bellows", 	50},
	{"Book Of Fire", 	66},
	{"God Tears", 	1}
};

ItemData weapon[] = {
	{"French Wrench", 	12},
	{"Bread Knife", 	10},
	{"Cheese Knife", 	9},
	{"Sword", 	70},
	{"Axe", 	80},
	{"Mace", 	80},
	{"Flail", 	75},
	{"Halberd", 	90},
	{"Morning Star", 	40},
	{"Short Sword", 	30},
	{"War Hammer", 	55},
	{"Dagger", 	40},
	{"Battle Axe", 	100}
};

ItemData food[] = {
	{"Fresh Quark Cheese", 	16},
	{"Cheesecake", 	25},
	{"Blue Cheese", 	37},
	{"Sheep Cheese", 	19},
	{"Wholemeal Bread", 	10},
	{"White Bread", 	15},
	{"Roll", 	3},
	{"Passover Bread", 	9},
	{"Lard With Bacon Cracklings", 	5},
	{"Pate", 	12},
	{"Pickled Cucumbers", 	13},
	{"Tomato", 	5},
	{"Potatoes", 	15},
	{"Carrot", 	8},
	{"Carrot Pie", 	25},
	{"Salt", 	9},
	{"Lettuce", 	11},
	{"Apple", 	5},
	{"Leg Of Lamb", 	30},
	{"Pig Snout", 	40},
	{"Ox Liver", 	50},
	{"Donkeys Ears", 	60},
	{"Horse Hooves", 	70}
};

ItemData drink[] = {
	{"Dark Beer", 	20},
	{"Light Beer", 	20},
	{"Red Wine", 	14},
	{"Wheat Beer", 	20},
	{"Vodka", 	200},
	{"Hooch", 	10},
	{"Potion Of Wisdom", 	30},
	{"Potion Of Stupidity", 	42},
	{"Potion Of Horse Talk", 	50},
	{"Duck Polymorph Potion", 	10},
	{"Lilliput Potion", 	100},
	{"Surprise Potion", 	200}
};

ItemData jewerly[] = {
	{"Copper Bracelet", 	55},
	{"Leather Bracelet", 	30},
	{"Silver Bracelet", 	80},
	{"Gold Bracelet", 	160},
	{"Strap Necklace", 	40},
	{"Silver Necklace", 	59},
	{"Little Earring", 	21},
	{"Jade Ring", 	89},
	{"Clay Ring", 	12},
	{"Silver Ring", 	75},
	{"Wedding Ring", 	48}
};

ItemData* Item::itemData[8] = {
	misc, clothes, armor, quest, weapon, food, drink, jewerly
};

void Item::Apply(const char* aName, int aValue)
{
	name = aName;
	value = aValue;
}

Item::Item(EItem aType, int aSubType)
{
	itemType = aType;
	itemSubType = aSubType;
	isEquipped = false;

	Apply(itemData[aType-1][aSubType-1].name, itemData[aType-1][aSubType-1].value);
}


Item::~Item()
{
}
